import Base from '@/utils/base.js'

export function formatLetter(value) {
	if (Base.isEmpty(value)) {
		return ''
	}
	if (typeof value != 'string') {
		value = value.toString()
	}
	return value.toLocaleUpperCase()
}

export function formimgdata(val, type = 'img') {
	if (val) {
		if (val.indexOf('http') != -1 || val.startsWith('/static'))
			return val;
		return Base.requestUrl('UPLOAD_URL') + val
	}
}